package org.javaboy.order.controller;

import org.javaboy.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class OrderController {

    @Autowired
    OrderService orderService;

    @PostMapping("/order")
    public Map<String,Object> order(Integer userId, Integer commodityId,Integer count) {
        return orderService.order(userId,commodityId,count);
    }
}
